// 引入 http 模块
const http = require('http');
global.ORDER_ENABLE = 1
// 创建服务器
const server = http.createServer((req, res) => {
    // 设置响应头
    res.writeHead(200, { 'Content-Type': 'application/json' });
    // 响应内容
    res.end(`{"enable": ${global.ORDER_ENABLE}}`);
});

// 设置监听端口
const PORT = 3000;
server.listen(PORT, () => {
    console.log(`Server is running at http://localhost:${PORT}`);
});